<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <p>hello world</p>
    <p id="test">hello world</p>
    <p>hello world</p>
    <p>hello world</p>
    <script>
    // nextSibling;
    /* nextSibling-->下一个兄弟节点 ie9以下识别为元素节点
    nextElementSibling-->下一个兄弟元素节点
     */
     var test=document.getElementById("test");
     var sibling=test.nextElementSibling;
    //  var sibling=test.nextSibling;
     alert(sibling);
    </script>
</body>
</html>